
use std::io::prelude::*;
use std::fs::File;

fn main() -> std::io::Result<()>
{
    
    let mut file = File::open("foo.txt")?;
    let mut str = String::new();

    file.read_to_string(& mut str)?;

    println!("{}", str);

    assert_eq!(str, "Hello, world!");
        Ok(())
}
